package com.rw.test.restful;

import com.rw.engine.permission.anno.Permission;
import com.rw.test.vo.ResultVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 权限测试
 */
@RestController
@RequestMapping("/RWdaze/PermissionTestController")
public class PermissionTestController {
    @GetMapping("/permissionPass")
    @Permission("select")
    public ResultVO<String> permissionPassTest() {
        return new ResultVO<>(0, "success");
    }

    @GetMapping("/permissionInterceptor")
    @Permission("create")
    public ResultVO<String> permissionInterceptorTest() {
        return new ResultVO<>(1, "Not interceptor!");
    }
}
